package com.personnel.client;


import com.carcenter.common.pojo.personnel.StoreManager;
import com.carcenter.common.pojo.personnel.UserDto;
import com.carcenter.common.result.Result;
import com.personnel.client.fallback.StaffApiFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(
        value = "carcenter-service-personnel",
        fallback = StaffApiFallback.class)
public interface StaffApi {
    @GetMapping("/staff/getStoreIdsByStaffName")
    public Result getStoreIdsByStaffName(@RequestParam("staffName")  String staffName);

    @PostMapping("/staff/getStoreManagersByManagerIds")
    public Result<List<StoreManager>> getStoreManagersByManagerIds(@RequestBody List<Integer> managerIds);

    @PostMapping("/users/getUserDtosByUserIds")
    public Result<List<UserDto>> getUserDtosByUserIds(@RequestBody List<Integer> userIds);
}
